<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <!-- 设置视口 -->
    <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!-- MUI框架 CSS -->
    <link rel="stylesheet" href="lib/mui/css/mui.css">
    <!-- 字体图标库 -->
    <link rel="stylesheet" href="lib/fontAwesome/css/font-awesome.min.css">
    <!-- swiper插件 CSS -->
    <link rel="stylesheet" href="lib/swiper/css/swiper.min.css">
    <!-- 项目CSS -->
    <link rel="stylesheet" href="less/search.css">
    <!-- 页面标题logo -->
    <link rel="SHORTCUT ICON" href="favicon.ico">
    <title>搜索页面</title>
</head>

<body>

    <!-- 头部区域 -->
    <header id="header">
        <div class="left">
            <a href="index.html" class="fa fa-chevron-left"></a>
        </div>

        <div class="center">
            <h4>乐淘搜索页面</h4>
        </div>

        <div class="right">
        </div>
    </header>

    <!-- 主体区域 -->
    <main id="main">
        <div class="search-form">
            <form action="#">
                <input type="search" class="input-search" placeholder="请输入你想要搜索的商品">
                <button type="button" class="mui-btn mui-btn-primary btn-search">搜索</button>
            </form>
        </div>
        <!-- 搜索历史 -->
        <div class="search-history">
            <!-- 原生编写 -->
            <!-- <div class="title">
                <span>搜索历史</span>
                <a href="#" class="fa fa-trash">清空历史</a>
            </div>
            <div class="content">
                <ul class="mui-table-view">
                    <li class="mui-table-view-cell">写
                        <span class="mui-badge fa fa-close"></span>
                    </li>
                    <li class="mui-table-view-cell">大
                        <span class="mui-badge fa fa-close"></span>
                    </li>
                    <li class="mui-table-view-cell">大师
                        <span class="mui-badge fa fa-close"></span>
                    </li>
                </ul>
            </div> -->


            <!-- mui组件 -->
            <div class="mui-card">
                <div class="mui-card-header">
                    <span>搜索历史</span>
                    <a href="#" class="fa fa-trash btn-clear">清空历史</a>
                </div>
                <div class="mui-card-content">
                    <div class="swiper-container">
                        <div class="swiper-wrapper">
                            <div class="swiper-slide">
                                <ul class="mui-table-view close-box">
                                    <!-- <li class="mui-table-view-cell">写
                                <span class="mui-badge fa fa-close"></span>
                            </li>
                            <li class="mui-table-view-cell">大
                                <span class="mui-badge fa fa-close"></span>
                            </li>
                            <li class="mui-table-view-cell">大师
                                <span class="mui-badge fa fa-close"></span>
                            </li> -->
                                </ul>
                            </div>
                        </div>

                    </div>
                </div>
            </div>

        </div>
    </main>

    <!-- 尾部区域 -->
    <footer id="footer">
        <div class="mui-row">
            <div class="mui-col-xs-3">
                <a href="index.html">
                    <i class="fa fa-home"></i>
                    <span>首页</span>
                </a>
            </div>
            <div class="mui-col-xs-3">
                <a href="category.html">
                    <i class="fa fa-bars"></i>
                    <span>分类</span>
                </a>
            </div>
            <div class="mui-col-xs-3">
                <a href="cart.html">
                    <i class="fa fa-shopping-cart"></i>
                    <span>购物车</span>
                </a>
            </div>
            <div class="mui-col-xs-3">
                <a href="user.html">
                    <i class="fa fa-user"></i>
                    <span>个人中心</span>
                </a>
            </div>
        </div>
    </footer>

    <!-- MUI框架 JS -->
    <script src="lib/mui/js/mui.js"></script>
    <!-- zepto框架 JS -->
    <script src="lib/zepto/zepto.min.js"></script>
    <!-- 模板引擎 -->
    <script src="lib/artTemplate/template-web.js"></script>
    <!-- swiper插件 JS -->
    <script src="lib/swiper/js/swiper.min.js"></script>
    <!-- 公共js -->
    <script src="js/comment.js"></script>
    <!-- 项目JS -->
    <script src="js/search.js"></script>
    

    <!-- 搜索历史模板 -->
    <script type="text/html" id="search-history">
        {{ if list.length > 0 }}
            {{ each list value i }}
                <li class="mui-table-view-cell" data-search="{{ value.key }}" data-index="{{ i }}"> 
                    {{ value.key }}
                    <span class="mui-badge fa fa-close"></span>
                </li>
            {{ /each }}
        {{ else }}
            <li class="mui-table-view-cell">
                当前无搜索记录~
            </li>
        {{ /if }}
    </script>
</body>

</html>